package com.example.demo.config;

import com.example.demo.entry.AuthClient;
import com.example.demo.service.IClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhangjiawen
 * @Date: 2021/4/1 9:15
 */
@Component
public class InitData implements ApplicationRunner {
    @Autowired
    private IClientService clientService;


    @Override
    public void run(ApplicationArguments args) throws Exception {

        List<AuthClient> list = clientService.list();
        System.out.println("查询出来："+list.size());

    }
}
